﻿/**
 *
 * @file SectionWidget.h
 * @brief 截面数据创建对话框
 * @author BaGuijun (baguijun@163.com)
 * @date 2024-04-07
 *
 */
#ifndef SECTIONWIDGET_H
#define SECTIONWIDGET_H

#include "GUIPropertyDialogAPI.h"
#include "GUIWidget/GUIWidgetBase.h"
#include"MaterialWidgetBase.h"
#include "FITK_Interface/FITKInterfaceStructural/FITKAbaAbstractSection.h"

namespace Ui{
    class SectionWidget;
}

namespace Core {
    class FITKWidget;
}

namespace Interface{
    class FITKAbstractSection;
    class FITKAbaAbastractSection;
}

namespace EventOper {
    class ParaWidgetInterfaceOperator;
}

namespace GUI
{
    /**
     * @brief 截面数据创建对话框
     * @author BaGuijun (baguijun@163.com)
     * @date 2024-04-07
     */
    class GUIPropertyDialogAPI SectionWidget : public GUIWidgetBase
    {
        Q_OBJECT;
    public:
        /**
         * @brief Construct a new Section Create Dialog object
         * @param[i]  mw             主窗口对象
         * @param[i]  oper           操作器对象
         * @author BaGuijun (baguijun@163.com)
         * @date 2024-04-25
         */
        SectionWidget(EventOper::ParaWidgetInterfaceOperator* oper, QWidget* parent);
        /**
         * @brief Destroy the Section Create Dialog object
         * @author BaGuijun (baguijun@163.com)
         * @date 2024-04-07
         */
        ~SectionWidget( );
    private slots:
        /**
         * @brief 点击继续按钮，将section传入到下一步创建菜单中
         * @author BaGuijun (baguijun@163.com)
         * @date 2024-04-22
         */
        void on_pb_continue_clicked( );
        /**
         * @brief 点击取消按钮删除掉创建的临时变量
         * @author BaGuijun (baguijun@163.com)
         * @date 2024-04-22
         */
        void on_pb_cancel_clicked( );
        /**
         * @brief 单选框更改的时候判断截面类型
         * @author BaGuijun (baguijun@163.com)
         * @date 2024-04-22
         */
        void categoryGroupToggledSlot( int btn, bool checked );
    private:
        /**
         * @brief 初始化界面，包括赋值等操作
         * @author BaGuijun (baguijun@163.com)
         * @date 2024-04-22
         */
        void initDialog( );
    private:
        /**
         * @brief 截面对象
         * @author BaGuijun (baguijun@163.com)
         * @date 2024-04-22
         */
        //Property::Section* _section{ };
        /**
         * @brief ui对象
         * @author BaGuijun (baguijun@163.com)
         * @date 2024-04-22
         */
        Ui::SectionWidget* _ui{ };
        /**
         * @brief 截面管理器对话框
         * @author BaGuijun (baguijun@163.com)
         * @date 2024-04-07
         */
        QDialog* _managerDialog = nullptr;
        /**
         * @brief 操作器对象
         * @author BaGuijun (baguijun@163.com)
         * @date 2024-04-25
         */
        EventOper::ParaWidgetInterfaceOperator* _oper = nullptr;
    };

}  // namespace GUI


#endif // SECTIONWIDGET_H
